<html>
<head><meta charset="utf-8"><title>statx shim · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html">statx shim</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="182269668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182269668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182269668">(Dec 01 2019 at 05:10)</a>:</h4>
<p>Hello everyone, so I've resumed my work on <a href="https://github.com/rust-lang/miri/issues/999" target="_blank" title="https://github.com/rust-lang/miri/issues/999">https://github.com/rust-lang/miri/issues/999</a>. First I wanted to be sure that I got the API right (<a href="http://man7.org/linux/man-pages/man2/statx.2.html" target="_blank" title="http://man7.org/linux/man-pages/man2/statx.2.html">http://man7.org/linux/man-pages/man2/statx.2.html</a>) so I'm trying to grab <code>struct statx *statxbuf</code> and write a bunch of zeroes to it in the same way is done in <a href="https://github.com/rust-lang/miri/blob/master/src/shims/time.rs#L53" target="_blank" title="https://github.com/rust-lang/miri/blob/master/src/shims/time.rs#L53"><code>shims/time.rs</code></a>. However I'm not able to deref the operand because the operand does not have a memory location, it is just an integer:</p>
<div class="codehilite"><pre><span></span>OpTy { op: Immediate(Scalar(0x0000000000020150)), layout: TyLayout { ty: i64, details: LayoutDetails { variants: Single { index: 0 }, fields: Union(0), abi: Scalar(Scalar { value: Int(I64, true), valid_range: 0..=18446744073709551615 }), largest_niche: None, align: AbiAndPrefAlign { abi: Align { pow2: 3 }, pref: Align { pow2: 3 } }, size: Size { raw: 8 } } } }
</pre></div>


<p>In contrast with the operand used in time:</p>
<div class="codehilite"><pre><span></span>OpTy { op: Immediate(Scalar(AllocId(596).0x0[&lt;untagged&gt;])), layout: TyLayout { ty: *mut libc::unix::timespec, details: LayoutDetails { variants: Single { index: 0 }, fields: Union(0), abi: Scalar(Scalar { value: Pointer, valid_range: 0..=18446744073709551615 }), largest_niche: None, align: AbiAndPrefAlign { abi: Align { pow2: 3 }, pref: Align { pow2: 3 } }, size: Size { raw: 8 } } } }
</pre></div>


<p>So what should I try here? Maybe to <code>force_ptr</code> it and then build a <code>MPlaceTy</code> with that?</p>



<a name="182282942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182282942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182282942">(Dec 01 2019 at 12:18)</a>:</h4>
<p>Yea, always use force_ptr if you expect to deref</p>



<a name="182286828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182286828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182286828">(Dec 01 2019 at 14:25)</a>:</h4>
<p>uhhh i think I'm almost there... but I'm having trouble getting the correct layout</p>



<a name="182286871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182286871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182286871">(Dec 01 2019 at 14:26)</a>:</h4>
<p>the problem is that when  I try to get the layout from libc i get <a href="https://docs.rs/libc/0.2.63/libc/fn.statx.html" target="_blank" title="https://docs.rs/libc/0.2.63/libc/fn.statx.html">https://docs.rs/libc/0.2.63/libc/fn.statx.html</a> instead of <a href="https://docs.rs/libc/0.2.63/libc/struct.statx.html" target="_blank" title="https://docs.rs/libc/0.2.63/libc/struct.statx.html">https://docs.rs/libc/0.2.63/libc/struct.statx.html</a> because they both are <code>libc::statx</code></p>



<a name="182287418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182287418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182287418">(Dec 01 2019 at 14:43)</a>:</h4>
<p>I have a horrible idea: grab the type from the function argument.</p>



<a name="182287815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182287815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182287815">(Dec 01 2019 at 14:54)</a>:</h4>
<p>I solved it grabbing it from another unambiguous path:</p>
<div class="codehilite"><pre><span></span><span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">statx_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">this</span><span class="p">.</span><span class="n">resolve_path</span><span class="p">(</span><span class="o">&amp;</span><span class="p">[</span><span class="s">&quot;libc&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;unix&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;linux_like&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;linux&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;gnu&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;statx&quot;</span><span class="p">])</span><span class="o">?</span><span class="p">.</span><span class="n">ty</span><span class="p">(</span><span class="o">*</span><span class="n">this</span><span class="p">.</span><span class="n">tcx</span><span class="p">);</span><span class="w"></span>
</pre></div>



<a name="182287816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182287816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182287816">(Dec 01 2019 at 14:54)</a>:</h4>
<blockquote>
<p>I have a horrible idea: grab the type from the function argument.</p>
</blockquote>
<p>but that would be awesome</p>



<a name="182287883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182287883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182287883">(Dec 01 2019 at 14:56)</a>:</h4>
<p>Does that path exist on all platforms?</p>



<a name="182287943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182287943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182287943">(Dec 01 2019 at 14:58)</a>:</h4>
<blockquote>
<p>Does that path exist on all platforms?</p>
</blockquote>
<p>probably not... but <code>statx</code> only exists in linux for certain kernel versions</p>



<a name="182288101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182288101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182288101">(Dec 01 2019 at 15:02)</a>:</h4>
<p>Oh, right, carry on</p>



<a name="182288107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182288107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182288107">(Dec 01 2019 at 15:02)</a>:</h4>
<p>well now it runs :P</p>



<a name="182288116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182288116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182288116">(Dec 01 2019 at 15:03)</a>:</h4>
<p>I mean it no longer crashes because of the terminfo error :P</p>



<a name="182288185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182288185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182288185">(Dec 01 2019 at 15:04)</a>:</h4>
<p>now that you mention it <code>InterpCx::resolve_path</code> at what level is working? host or target?</p>



<a name="182288345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182288345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182288345">(Dec 01 2019 at 15:09)</a>:</h4>
<p>Target</p>



<a name="182289454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182289454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182289454">(Dec 01 2019 at 15:41)</a>:</h4>
<p>great</p>



<a name="182499719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182499719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182499719">(Dec 03 2019 at 21:42)</a>:</h4>
<p>do you know why</p>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">int_to_immty_checked</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">int</span>: <span class="kt">i128</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">layout</span>: <span class="nc">TyLayout</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">InterpResult</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="p">,</span><span class="w"> </span><span class="n">ImmTy</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="p">,</span><span class="w"> </span><span class="n">Tag</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// If `int` does not fit in `size` bits, we error instead of letting</span>
<span class="w">    </span><span class="c1">// `ImmTy::from_int` panic.</span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">layout</span><span class="p">.</span><span class="n">size</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">truncated</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">truncate</span><span class="p">(</span><span class="n">int</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">u128</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="n">sign_extend</span><span class="p">(</span><span class="n">truncated</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="kt">i128</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">int</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">throw_unsup_format</span><span class="o">!</span><span class="p">(</span><span class="w"></span>
<span class="w">            </span><span class="s">&quot;Signed value {:#x} does not fit in {} bits&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">int</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">size</span><span class="p">.</span><span class="n">bits</span><span class="p">()</span><span class="w"></span>
<span class="w">        </span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="nb">Ok</span><span class="p">(</span><span class="n">ImmTy</span>::<span class="n">from_int</span><span class="p">(</span><span class="n">int</span><span class="p">,</span><span class="w"> </span><span class="n">layout</span><span class="p">))</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>fails to fit <code>0x8000</code> in 16 bits?</p>



<a name="182499962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182499962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182499962">(Dec 03 2019 at 21:45)</a>:</h4>
<p>it is because its trying to fit it as signed?</p>



<a name="182509021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509021">(Dec 03 2019 at 23:29)</a>:</h4>
<p>have you tried printing the result of <code>sign_extend</code>?</p>



<a name="182509090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509090">(Dec 03 2019 at 23:30)</a>:</h4>
<p>I think it creates a 0xFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_8000</p>



<a name="182509114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509114">(Dec 03 2019 at 23:30)</a>:</h4>
<p>it is the correct number but with negative sign</p>



<a name="182509201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509201">(Dec 03 2019 at 23:31)</a>:</h4>
<p>?</p>



<a name="182509286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509286">(Dec 03 2019 at 23:32)</a>:</h4>
<p>oh right, that's what you are trying to check</p>



<a name="182509331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509331">(Dec 03 2019 at 23:33)</a>:</h4>
<p>what was the value before truncation? <code>0x8000</code> should totally not error in this function</p>



<a name="182509343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509343">(Dec 03 2019 at 23:33)</a>:</h4>
<p>oh</p>



<a name="182509347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509347">(Dec 03 2019 at 23:33)</a>:</h4>
<p>wait it should</p>



<a name="182509368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509368">(Dec 03 2019 at 23:34)</a>:</h4>
<p>because as a i128 that's not a negative number</p>



<a name="182509421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509421">(Dec 03 2019 at 23:34)</a>:</h4>
<p>so yes, that is supposed to fail</p>



<a name="182509425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509425">(Dec 03 2019 at 23:34)</a>:</h4>
<p>is it there an ImmTy::from_uint or something?</p>



<a name="182509435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509435">(Dec 03 2019 at 23:34)</a>:</h4>
<p>probably if that's what you want :D</p>



<a name="182509470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509470">(Dec 03 2019 at 23:35)</a>:</h4>
<p>(I'm not sure what your actual use case is, so this is getting XY-problemy)</p>



<a name="182509482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509482">(Dec 03 2019 at 23:35)</a>:</h4>
<p>Kein problem</p>



<a name="182509493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509493">(Dec 03 2019 at 23:35)</a>:</h4>
<p>with that is enough, I can fix everything with that</p>



<a name="182509554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182509554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182509554">(Dec 03 2019 at 23:36)</a>:</h4>
<p>I'll add a new method for unsigned ints</p>



<a name="182551592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/statx%20shim/near/182551592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christian Poveda <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/statx.20shim.html#182551592">(Dec 04 2019 at 12:43)</a>:</h4>
<blockquote>
<p>(I'm not sure what your actual use case is, so this is getting XY-problemy)</p>
</blockquote>
<p>So the problem was that some the values provided by <code>statx</code> are unsigned, and we didn't have a way to provide Immediates that were uints</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>